[xend] Add 'xend_config_format' field to the Xend information block.
authorChristian Limpach <Christian.Limpach@xensource.com>
Sun, 20 Aug 2006 23:11:17 +0000 (00:11 +0100)
committerChristian Limpach <Christian.Limpach@xensource.com>
Sun, 20 Aug 2006 23:11:17 +0000 (00:11 +0100)
When running 'xm info' it appears thus:

 # xm info
 host                   : 10.13.4.252
 release                : 2.6.17-1.2157_FC5xen0
 version                : #1 SMP Tue Jul 11 23:30:05 EDT 2006
 machine                : x86_64
 ...snipped rest of data...
 cc_compile_domain      : build.redhat.com
 cc_compile_date        : Tue Jul 11 22:50:42 EDT 2006
 xend_config_format     : 2

It will also appear in the SEXPR returned when doing a GET on the
/xend/node path in XenD's HTTP service:

 (node
   (system Linux)
   (host 10.13.4.252)
   (release 2.6.17-1.2157_FC5xen0)
   (version '#1 SMP Tue Jul 11 23:30:05 EDT 2006')
   (machine x86_64)
   ...snipped rest of data...
   (cc_compile_domain build.redhat.com)
   (cc_compile_date 'Tue Jul 11 22:50:42 EDT 2006')
   (xend_config_format 2)
 )

The patch sets the format to value '2' to indicate that we're on the version
with the new style HVM configuration for CDROM devices. The old style having
implicitly been version '1'.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/python/xen/xend/XendNode.py

index 72bcedb60ebc6dccdc882e10ada53fbbda19d0fb..ef19ad7acd5f164157aee9f7cc087d8ee38cc0fa 100644 (file)
@@ -46,7 +46,8 @@ class XendNode:
         return self.xc.bvtsched_global_get()
     
     def info(self):
-        return self.nodeinfo() + self.physinfo() + self.xeninfo()
+        return (self.nodeinfo() + self.physinfo() + self.xeninfo() +
+                self.xendinfo())
 
     def nodeinfo(self):
         (sys, host, rel, ver, mch) = os.uname()
@@ -100,6 +101,9 @@ class XendNode:
 
         return [[k, info[k]] for k in ITEM_ORDER]
 
+    def xendinfo(self):
+        return [['xend_config_format',  2]]
+
 
 def instance():
     global inst